<!--/**
*广告投放页面*
*
* @author LWG
* @date 2022/9/21 14:45
* @since 1.0.0
*/-->

<template>
    <div>
      <div>
        <van-image height="100%" src="https://s1.328888.xyz/2022/09/21/2W01U.jpg" />
      </div>

      <van-goods-action style="background-color: transparent !important;">
        <van-goods-action-button
          type="primary"
          text="详情"
        />
        <van-goods-action-button type="info" :text="content">
        </van-goods-action-button>
        
      </van-goods-action>
  
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        time: '5',
        content: ''
      };
  },
  created() {
    this.content = this.time //这里解决60秒不见了的问题
    console.log('1111111111111',this.content)
      let clock = window.setInterval(() => {
        this.time--
        this.content = this.time
        if (this.time == 0) {     //当倒计时小于0时清除定时器
          this.$router.push("/homeview/share/sharepage")
        }
      },1000)
  },
    methods: {
      past(){
        this.$router.push("/homeview/share/sharepage")
      },
    },
  };
  </script>
  
  <style scoped>
  .van-nav-bar {
    background-color: #ff6242;
  }
  .van-nav-bar /deep/ .van-nav-bar__title {
    color: white;
  }
  .van-nav-bar /deep/ .van-icon {
    color: white;
  }
  </style>